<?php
session_start();

if(isset($_SESSION['id']))
{
?>

<?php
if ($_GET)
{

for ($b=1;$b<=$_GET['valor'];$b++)
{
?>			 
         <label class="desc2" style="font-size:12px">&iquest;El tel&eacute;fono tiene extensi&oacute;n?</label>
        Si&nbsp &nbsp;<input  type="radio" name="boton_<?php echo $b; ?>" id="boton_<?php echo $b; ?>" value="si" onclick="document.getElementById('contacto1').elements['extension_<?php echo $b; ?>'].disabled=false;
         $('ext_<?php echo $b; ?>').style.display = 'block';"/>
          &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;  &nbsp; &nbsp;&nbsp; &nbsp;
         No&nbsp;&nbsp;<input type="radio" name="boton_<?php echo $b;?>" id="boton_<?php echo $b;?>" value="no" onclick="this.form.elements['extension_<?php echo $b; ?>'].disabled=true;this.form.elements['extension_<?php echo $b; ?>'].value='';
         		$('ext_<?php echo $b; ?>').style.display = 'none';"/>
         <li>		
          <label class="desc2" style="font-size:12px;">Tel&eacute;fono <?php echo $b; ?>:</label>
         	<div class="form-row">
    	<input type="text" name="telefono_<?php echo $b; ?>"  id="telefono_<?php echo $b; ?>"  class="inputtext required field text medium" title="Ingrese el n&uacute;mero telef&oacute;nico del usuario">  
        	</div>
        </li>
        <li>
        <div id="ext_<?php echo $b; ?>" style="display:none;">
        <label class="desc2" style="font-size:12px">Extensi&oacute;n <?php echo $b; ?>: </label>
             <div class="form-row">
        <input type="text" name="extension_<?php echo $b; ?>" id="extension_<?php echo $b; ?>" class=" required medium" title="Ingrese el n&uacute;mero de extensi&oacute;n del usuario" disabled="disabled" >
			</div>
         </div>
         </li>
         <li>
		 <label class="desc2" style="font-size:12px;">Tipo <?php echo $b; ?>:</label>
         	<div class="form-row">
             <select style="font-size:11px;" name="tipo_<?php echo $b;?>" id="tipo_<?php echo $b;?>">
             <option value="casa">Casa</option>
             <option value="trabajo">Trabajo</option>
             <option value="movil">M&oacute;vil</option>
             </select>
        	</div>
        </li>
<script>
$('ext_<?php echo $b; ?>').style.display = 'none';
</script>
</div>
<?php
}
}
?>
<?php
}
else
{
  session_unset();
  session_destroy();
  echo "La sesión ha caducado o se ingreso incorrectamente";
  echo "<script type='text/javascript'>redireccionar('index.php',3000);</script>";
}


?>